package cn.wuyu.baselibrary.net.utils;

import android.text.TextUtils;

import cn.wuyu.baselibrary.utils.AppUtil;

/**
 * author : xuzongmeng
 * date   : 2018/8/5
 * desc   :
 */
public class TokenUtil {
    public static String TOKEN = getToken();
    public static void setToken(String token) {
        AppUtil.getACache().put("token",token);
    }

    public static String getToken() {
        String token;
        if (TextUtils.isEmpty(AppUtil.getACache().getAsString("token"))) {
            token = "";
        } else {
            token = AppUtil.getACache().getAsString("token");
        }
        return token;
    }
}
